<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        ul {
            list-style: none;
            width: 510px;
            margin-left: -1px;
        }
        li {
            float: left;
            width: 100px;
            /*width: 98px;*/
            padding: 0 1px;
            height: 40px;
            text-align: center;
            cursor: pointer;
            font:400 18px/40px "simsun";

        }
        li:hover {
            font-weight: 700;
            color: #f40;
            width: 98px;
            border-left: 1px solid #f40;
            border-right: 1px solid #f40;
            /*border-bottom: 3px solid #f40;*/
        }
        .box {
            width: 500px;
            height: 400px;
            margin: 100px auto;
            border: 1px solid #ccc;
            overflow: hidden;
        }
    </style>
</head>
<body>
    <div class="box">
        <ul>
            <li>公告</li>
            <li>规则</li>
            <li>论坛</li>
            <li>安全</li>
            <li>公益</li>
        </ul>
    </div>
</body>
</html>